﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:Telerik_Windows_Controls_Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
    x:Class="HSE.Login"
    mc:Ignorable="d">
	<UserControl.Resources>
		<ControlTemplate x:Key="ValidationToolTipTemplate">
			<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
				<Grid.RenderTransform>
					<TranslateTransform x:Name="xform" X="-25"/>
				</Grid.RenderTransform>
				<VisualStateManager.VisualStateGroups>
					<VisualStateGroup x:Name="OpenStates">
						<VisualStateGroup.Transitions>
							<VisualTransition GeneratedDuration="0"/>
							<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
								<Storyboard>
									<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
										<DoubleAnimation.EasingFunction>
											<BackEase Amplitude=".3" EasingMode="EaseOut"/>
										</DoubleAnimation.EasingFunction>
									</DoubleAnimation>
									<DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
								</Storyboard>
							</VisualTransition>
						</VisualStateGroup.Transitions>
						<VisualState x:Name="Closed">
							<Storyboard>
								<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Open">
							<Storyboard>
								<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform"/>
								<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
				</VisualStateManager.VisualStateGroups>
				<Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
				<Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
				<Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
				<Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
				<Border Background="#FFDC000C" CornerRadius="2"/>
				<Border CornerRadius="2">
					<TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
				</Border>
			</Grid>
		</ControlTemplate>
		<Style x:Key="TextBoxStyle1" TargetType="TextBox">
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Background" Value="#FFFFFFFF"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="2"/>
			
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="TextBox">
						<Grid x:Name="RootElement">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FF99C1E2" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="MouseOverBorder"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="ReadOnly">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="ValidationStates">
									<VisualState x:Name="Valid"/>
									<VisualState x:Name="InvalidUnfocused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="InvalidFocused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<System:Boolean>True</System:Boolean>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="5" Opacity="1">
								<Grid>
									<Border x:Name="ReadOnlyVisualElement" Background="#5EC9C9C9" Opacity="0"/>
									<Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
										<ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/>
									</Border>
								</Grid>
							</Border>
							<Border x:Name="DisabledVisualElement" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}" Background="#A5F7F7F7" IsHitTestVisible="False" Opacity="0"/>
							<Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Margin="1" Opacity="0"/>
							<Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
								<ToolTipService.ToolTip>
									<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
										<ToolTip.Triggers>
											<EventTrigger RoutedEvent="Canvas.Loaded">
												<BeginStoryboard>
													<Storyboard>
														<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
															<DiscreteObjectKeyFrame KeyTime="0">
																<DiscreteObjectKeyFrame.Value>
																	<System:Boolean>true</System:Boolean>
																</DiscreteObjectKeyFrame.Value>
															</DiscreteObjectKeyFrame>
														</ObjectAnimationUsingKeyFrames>
													</Storyboard>
												</BeginStoryboard>
											</EventTrigger>
										</ToolTip.Triggers>
									</ToolTip>
								</ToolTipService.ToolTip>
								<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
									<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0"/>
									<Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
								</Grid>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="PasswordBoxStyle1" TargetType="PasswordBox">
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Background" Value="#FFFFFFFF"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="2"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="PasswordBox">
						<Grid x:Name="RootElement">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FF99C1E2" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="MouseOverBorder"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="ValidationStates">
									<VisualState x:Name="Valid"/>
									<VisualState x:Name="InvalidUnfocused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="InvalidFocused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<System:Boolean>True</System:Boolean>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="5" Opacity="1">
								<Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
									<Border x:Name="ContentElement" Margin="{TemplateBinding Padding}"/>
								</Border>
							</Border>
							<Border x:Name="DisabledVisualElement" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}" Background="#A5F7F7F7" IsHitTestVisible="False" Opacity="0"/>
							<Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Margin="1" Opacity="0"/>
							<Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
								<ToolTipService.ToolTip>
									<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
										<ToolTip.Triggers>
											<EventTrigger RoutedEvent="Canvas.Loaded">
												<BeginStoryboard>
													<Storyboard>
														<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
															<DiscreteObjectKeyFrame KeyTime="0">
																<DiscreteObjectKeyFrame.Value>
																	<System:Boolean>true</System:Boolean>
																</DiscreteObjectKeyFrame.Value>
															</DiscreteObjectKeyFrame>
														</ObjectAnimationUsingKeyFrames>
													</Storyboard>
												</BeginStoryboard>
											</EventTrigger>
										</ToolTip.Triggers>
									</ToolTip>
								</ToolTipService.ToolTip>
								<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
									<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0"/>
									<Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
								</Grid>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF848484"/>
		<!--<LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FFFFFFFF" Offset="0"/>
			<GradientStop Color="#FFDCDCDC" Offset="0.50"/>
			<GradientStop Color="#FFADADAD" Offset="0.50"/>
			<GradientStop Color="#FFD4D4D4" Offset="1"/>
		</LinearGradientBrush>-->
		<SolidColorBrush x:Key="ControlBackground_Normal" Color="White" />
		<SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000"/>
		<CornerRadius x:Key="ControlOuterBorder_CornerRadius">5</CornerRadius>
		<telerik:Office_BlackTheme x:Key="Theme"/>
		<SolidColorBrush x:Key="ControlElement_Normal" Color="#FF000000"/>
		<SolidColorBrush x:Key="ControlOuterBorder" Color="#FF848484"/>
		<SolidColorBrush x:Key="ControlBackground" Color="#FFFFFFFF"/>
		<SolidColorBrush x:Key="ControlElement_Disabled" Color="#FF8D8D8D"/>
		<SolidColorBrush x:Key="ControlElement_Active" Color="#FF000000"/>
		<Style x:Key="RadDropDownButtonStyle1" TargetType="telerik:RadDropDownButton">
			<Setter Property="IsOpen" Value="false"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
			<Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
			<Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="3"/>
			<Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="telerik:RadDropDownButton">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content"/>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Disabled}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderEnabled" Storyboard.TargetName="ButtonChrome">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<System:Boolean>False</System:Boolean>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="IsOpenState">
									<VisualState x:Name="Closed"/>
									<VisualState x:Name="Opened">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Active}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="DropDownButtonPosition">
									<VisualState x:Name="DropDownButtonAtLeft">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="DropDownButtonAtTop">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="DropDownButtonAtRight">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="2"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="DropDownButtonAtBottom">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Row)" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0" Value="2"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="PopupPlacementState">
									<VisualState x:Name="PlacementBottom"/>
									<VisualState x:Name="PlacementTop">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<TransformGroup>
															<RotateTransform Angle="180"/>
														</TransformGroup>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="PlacementLeft">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<TransformGroup>
															<RotateTransform Angle="90"/>
														</TransformGroup>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="PlacementRight">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform" Storyboard.TargetName="DropDownIndicator">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<TransformGroup>
															<RotateTransform Angle="-90"/>
														</TransformGroup>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="{TemplateBinding CornerRadius}" RenderNormal="{TemplateBinding IsBackgroundVisible}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" RenderChecked="{TemplateBinding IsOpen}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="*"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
								<Path x:Name="DropDownIndicator" Grid.Column="1" Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" Fill="{StaticResource ControlElement_Normal}" HorizontalAlignment="Center" IsHitTestVisible="False" Margin="5,3,5,3" Grid.Row="2" RenderTransformOrigin="0.5,0.5" Visibility="{TemplateBinding DropDownIndicatorVisibility}" VerticalAlignment="Center"/>
							</Grid>
							<telerik:Popup x:Name="DropDownPopup">
								<Grid>
									<Border x:Name="DropDownPopupBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="1" Background="{StaticResource ControlBackground}" CornerRadius="0" Height="{TemplateBinding DropDownHeight}" MaxWidth="{TemplateBinding DropDownMaxWidth}" MaxHeight="{TemplateBinding DropDownMaxHeight}" MinWidth="3" MinHeight="3" Width="{TemplateBinding DropDownWidth}">
										<ContentPresenter x:Name="DropDownPopupContent" ContentTemplate="{TemplateBinding DropDownContentTemplate}" Content="{TemplateBinding DropDownContent}" DataContext="{Binding DataContext, RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
									</Border>
								</Grid>
							</telerik:Popup>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyle1" TargetType="Button">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="Padding" Value="0"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="FontSize" Value="16" />
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<!--<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
											<ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
											<ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
											<ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>-->
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<!--<ColorAnimation Duration="0" To="#FF6DBDD1" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
											<ColorAnimation Duration="0" To="#D8FFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
											<ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
											<ColorAnimation Duration="0" To="#8CFFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
											<ColorAnimation Duration="0" To="#3FFFFFFF" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>-->
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<!--<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>-->
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<!--<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>-->
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="3">
								<Grid Background="{TemplateBinding Background}" Margin="0">
									<Border x:Name="BackgroundAnimation" Background="#FF448DCA" Opacity="0"/>
									<!--<Rectangle x:Name="BackgroundGradient">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
												<GradientStop Color="#FFFFFFFF" Offset="0"/>
												<GradientStop Color="#F9FFFFFF" Offset="0.375"/>
												<GradientStop Color="#E5FFFFFF" Offset="0.625"/>
												<GradientStop Color="#C6FFFFFF" Offset="1"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>-->
									<Ellipse Height="50" Width="50" VerticalAlignment="Center">
										<Ellipse.Fill>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								    			<GradientStop Color="#FF3D8FC1"/>
								    			<GradientStop Color="#FF175EA0" Offset="1"/>
								    		</LinearGradientBrush>
										</Ellipse.Fill>
									</Ellipse>
								</Grid>
							</Border>
							<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
							<!--<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
							<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FF6DBDD1" StrokeThickness="1"/>-->
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
        <Storyboard x:Name="sbshowlogin">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="sysSelectBorder">
				<EasingDoubleKeyFrame KeyTime="0" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-90">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="sysSelectBorder">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="loginBorder">
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="loginBorder">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            
		</Storyboard>
        <Storyboard x:Name="sbhiddenlogin">
            
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="loginBorder">
                <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn"/>
                       
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="loginBorder">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="sysSelectBorder">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="sysSelectBorder">
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-90">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="#FFD7D7D7">
             <Border x:Name="loginBorder">
        	<Border.Projection>
        		<PlaneProjection RotationY="90"/>
        	</Border.Projection>
            <Grid>
		        <Grid.RowDefinitions>
			        <RowDefinition Height="auto"/>
			        <RowDefinition Height="auto"/>
			        <RowDefinition Height="auto"/>
			        <RowDefinition Height="auto"/>
			        <RowDefinition Height="auto"/>
					<RowDefinition Height="auto"/>
		        </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Vertical">
                    <Image  Source="{Binding SelectSys}" Width="200" Height="200" Margin="0 20 0 20"/>
                    <TextBlock Width="200" Text="{Binding SelectSysname}" HorizontalAlignment="Center" FontSize="29.333" FontFamily="/HSE;component/Fonts/Fonts.zip#FZHei-B01S"></TextBlock>
                </StackPanel>
                
                <StackPanel Grid.Row="1" Orientation="Vertical">
                    <TextBlock  Text="部门：" Width="200" Margin="0 5 0 0" Foreground="#FF4D4545" FontSize="18.667" FontFamily="/SilverlightApplication2;component/Fonts/Fonts.zip#FZHei-B01S"/>
                    <telerik:RadDropDownButton Height="35" Margin="0"  Width="200" Content="地籍科" Style="{StaticResource RadDropDownButtonStyle1}">
                        <telerik:RadDropDownButton.DropDownContent>
                            <Grid></Grid>
                        </telerik:RadDropDownButton.DropDownContent>
                    </telerik:RadDropDownButton>
                </StackPanel>
                <StackPanel Grid.Row="2" Orientation="Vertical">
                    <TextBlock Text="用户：" Width="200" Margin="0 5 0 0" Foreground="#FF4D4545" FontSize="18.667" FontFamily="/SilverlightApplication2;component/Fonts/Fonts.zip#FZHei-B01S"/>
                    <TextBox  Width="200" Text="{Binding Username,Mode=TwoWay}" Margin="0" Style="{StaticResource TextBoxStyle1}"  Height="35" />
                </StackPanel>
                <StackPanel Grid.Row="3" Orientation="Vertical">
                    <TextBlock  Text="密码：" Width="200" Margin="0 5 0 0" Foreground="#FF4D4545" FontSize="18.667" FontFamily="/SilverlightApplication2;component/Fonts/Fonts.zip#FZHei-B01S"/>
                    <PasswordBox PasswordChar="*" Password="{Binding Password, Mode=TwoWay}"  Height="35" Margin="0" Width="200" Style="{StaticResource PasswordBoxStyle1}" />
                </StackPanel>
		        <Button  x:Name="btn_login" Grid.Row="4" Width="55" Height="55" Margin="0 20 0 0" Content="登录" Style="{StaticResource ButtonStyle1}" Click="btn_login_Click"/>
	        	<Button  Grid.Row="5" Width="55" Height="55" Margin="0 20 0 0"  Style="{StaticResource ButtonStyle1}" Click="Button_Click">
	        		<Button.Content>
	        			<Image Source="Images/back.png" Width="48" Height="48"></Image>    		
					</Button.Content>     	
				</Button>
			</Grid>
        </Border>
             <Border x:Name="sysSelectBorder" HorizontalAlignment="Center" VerticalAlignment="Center">
        	<Border.Projection>
        		<PlaneProjection/>
        	</Border.Projection>
            <Grid x:Name="grid">
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Image Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Width="200" Height="200" Source="Images/logo.png"></Image>

                <TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="基层HSE动态监控信息管理服务端系统" HorizontalAlignment="Center" Margin="0,30" FontSize="29.333" FontFamily="/HSE;component/Fonts/Fonts.zip#FZHei-B01S" ></TextBlock>
                
                <StackPanel Grid.Row="2" Grid.Column="0" Margin="10">
                    <Image Source="{Binding Sys2}" x:Name="sys02" Width="150" Height="150" Cursor="Hand" MouseLeftButtonUp="sys02_MouseLeftButtonUp"></Image>
                    <TextBlock Text="{Binding Sys2name}" HorizontalAlignment="Center" FontSize="18.667"></TextBlock>
                </StackPanel>
                <StackPanel  Grid.Row="2" Grid.Column="1" Margin="10">
                    <Image Source="{Binding Sys1}" x:Name="sys01" Width="150" Height="150" Cursor="Hand" MouseLeftButtonUp="sys01_MouseLeftButtonUp"></Image>
                    <TextBlock Text="{Binding Sys1name}" HorizontalAlignment="Center" FontSize="18.667"></TextBlock>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</UserControl>
